package com.wuhan.aiweb;

import com.wuhan.aiweb.service.TestService;
import com.wuhan.entity.TestStudent;
import com.wuhan.mapper.TestMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api")
@RequiredArgsConstructor
public class TestController {

    private final TestService testService;
    @RequestMapping("/test")
    public String test() {

        return "hello test";

    }

    @RequestMapping("/test/Student")
    public List<TestStudent> testStudent() {

        return testService.getStudents();
    }



}
